Skip to content

Organizations: allow uploading avatar #12254

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Aug 14, 2025
Merged

Organizations: allow uploading avatar #12254

merged 10 commits into from
Aug 14, 2025

Conversation

stsewd
Copy link
Member

@stsewd stsewd commented Jun 17, 2025

  • The file size is set to 750kb as max
  • The image dimensions should be equal or less to 500px
  • Only jpg and png formats are allowed (this is a soft check anyway), we are not checking for the content, but django does check if the file is an image using pillow at least.
  • Images are publicly accessible and can be enumerated, I think this is fine, avatar images aren't sensible information.
  • pillow is a required dependency when using ImageField

This requires creating a new bucket and the corresponding settings in ops.

Closes https://github.com/readthedocs/readthedocs-corporate/issues/1471

@stsewd stsewd requested a review from a team as a code owner June 17, 2025 19:18
@stsewd stsewd requested a review from humitos June 17, 2025 19:18
@stsewd
Copy link
Member Author

stsewd commented Jun 17, 2025

Not sure about the migrations check, I don't see any changes locally :/

Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I left some small comments.

@stsewd stsewd merged commit d589faf into main Aug 14, 2025
4 of 5 checks passed
@stsewd stsewd deleted the organization-avatar branch August 14, 2025 21:12
stsewd added a commit to readthedocs/ext-theme that referenced this pull request Aug 14, 2025
https://github.com/user-attachments/assets/37882662-81cf-4f95-a870-6c96d9085bfc

Looks like the error message from file fields is duplicated, I think we
are overriding how we render fields in the new theme somewhere...

Matches readthedocs/readthedocs.org#12254
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants